package cn.wsalix.shop.status;

public enum ShopOperateEnum {
	onsell("1", "上架"), lack("2", "缺货"), undercarriage("4", "下架"), stock("5",
			"进货");
	private String code;
	private String title;

	ShopOperateEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static ShopOperateEnum findByCode(String code) {
		for (ShopOperateEnum userKind : ShopOperateEnum.values()) {
			if (userKind.getCode().equals(code)) {
				return userKind;
			}
		}
		return null;
	}

}
